﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LOMBARDISPICK.Model;

namespace LOMBARDISPICK.Model.Infrastructure
{
	public class DatabaseFactory : Disposable, IDatabaseFactory
	{
		private LombardisPickEntities dataContext;
		public LombardisPickEntities Get()
		{
			return dataContext ?? (dataContext = new LombardisPickEntities());
		}
		protected override void DisposeCore()
		{
			if (dataContext != null)
				dataContext.Dispose();
		}
	}
}
